package com.platform.qujia.task;

import com.platform.qujia.service.WxMessageTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration
@EnableScheduling
@Slf4j
public class WxMessageScheduledTask {

    @Autowired
    private WxMessageTemplateService wxMessageTemplateService;

    @Scheduled(fixedRate=600000)
    public void WxMessageTemplatePush() {
        log.info("========================微信模板消息推送定时任务-开始执行==========================");
        //wxMessageTemplateService.WxMessageTemplatePushForRedis();
        wxMessageTemplateService.batchSendOilPriceAdjustWxTemplateMessageFromRedis();
        log.info("========================微信模板消息推送定时任务-执行结束==========================");
    }
}
